<?php
class Historial
{
	var $id_estatus;#` int(10) unsigned NOT NULL auto_increment,
	var $id_envio;#` int(10) unsigned NOT NULL default '0',
	var $login_usuario;#` varchar(15) default NULL,
	var $sucursal;#` varchar(50) default NULL,
	var $fecha;#` date default NULL,
	var $hora;#` time NOT NULL,
	var $estatus;#` varchar(25) default NULL,
	
	
	function insertar(){
		
	}
	function agregar(){
		
	}
	function toObjeto(){}
	
	function toJson(){}
	
	
	function setId($_x){$this->id_estatus=(trim($_x)=="" || $_x=="null" || $_x==null) ?"" : trim($_x);}
	function setIdEnvio($_x){$this->id_envio=(trim($_x)=="" || $_x=="null" || $_x==null) ?"" : trim($_x);}
	function setEstatus($_x){$this->estatus=(trim($_x)=="" || $_x=="null" || $_x==null) ?"" : trim($_x);}
	
	function getId(){return $this->id_estatus;}
	function getIdEnvio(){return $this->id_envio;}
	function getEstatus(){return $this->estatus;}
	
	function editarEstatus($d){
		if($d != $this->getEstatus()){
			$this->setEstatus($d);
			new Conexion("UPDATE historial_estatus set estatus='".$this->getEstatus()."' where id_estatus=".$this->getId());
		}
	}

}
?>
